import request from '@/utils/request'
import { getServicePath } from '@/api/baseUrlConfig'
const servicePath = getServicePath()

// 查询会议列表
export function queryByCondition (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/meeting-mgmt/queryByCondition',
    method: 'get',
    params: data
  })
}

// 查询参会情况
export function queryAttendanceByCondition (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/meeting-mgmt/queryAttendanceByCondition',
    method: 'get',
    params: data
  })
}

// id查询会议
export function queryById (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/meeting-mgmt/queryById/${data.id}`,
    method: 'get',
    params: data
  })
}

// 新增会议
export function add (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/meeting-mgmt/add',
    method: 'post',
    data
  })
}

// 编辑会议
export function edit (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/meeting-mgmt/edit',
    method: 'post',
    data
  })
}

// 删除会议
export function deleteById (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/meeting-mgmt/deleteById/${data.id}`,
    method: 'get',
    params: data
  })
}

// 请假审批列表
export function getTodoPage (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/meeting-mgmt/getTodoPage',
    method: 'post',
    data
  })
}

// 会议请假审批
export function approvalMeeting (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/meeting-mgmt/approvalMeeting',
    method: 'post',
    data
  })
}

// 查询党员列表
export function queryPersonList (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/party-member-info-mgmt/queryList`,
    method: 'get',
    params: data
  })
}
// 查询党员信息
export function queryPersonById (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/party-member-info-mgmt/queryById/${data.id}`,
    method: 'get',
    params: data
  })
}

// 新增会议类型
export function addMeetingType (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/meeting-type-tree/add`,
    method: 'post',
    data
  })
}

// 编辑会议类型
export function editMeetingType (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/meeting-type-tree/edit`,
    method: 'post',
    data
  })
}

// 删除会议类型
export function deleteMeetingType (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/meeting-type-tree/deleteById/${data.id}`,
    method: 'get',
    params: data
  })
}

// 查询会议类型树
export function queryMeetingTypeTree (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/meeting-type-tree/queryTree`,
    method: 'get',
    params: data
  })
}

// 查询会议类型列表
export function queryMeetingTypeList (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/meeting-type-tree/queryList`,
    method: 'get',
    params: data
  })
}
